package com.mingqijia.gassafety.db.mapper;

import com.mingqijia.gassafety.db.entity.DtuBindingOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 设备安装工单信息 Mapper 接口
 * </p>
 *
 * @author wanghai
 * @since 2022-09-19
 */
@Mapper
@Repository
public interface DtuBindingOrderMapper extends BaseMapper<DtuBindingOrder> {

    //根据订单号查询
    List<DtuBindingOrder> listByOutOrderCode(@Param("spId") String spId,@Param("outOrderCode") String outOrderCode );


    DtuBindingOrder selectByImei(@Param("imei") String imei,@Param("spId")  String spId);
    //根据 设备号查询 设备和关联的探头数据
    List<DtuBindingOrder>  selectAllByImei(@Param("imei") String imei,@Param("spId")  String spId);

    //根据设备号获取 模板二设备及订单信息
    Map<String, Object> gasAsstInfoByImei(@Param("imei")String iMEI, @Param("spId")String spId);
}
